<template>
    <div>
        <div>应用主页</div>
    appId:admin
        <el-input v-model="returnUrl">
            <template slot="prepend">return-url</template>
        </el-input>
        <el-button @click="login_click">去登录</el-button>
    </div>
</template>

<script setup>




defineOptions({
    name: "app1",
    inheritAttrs: true,
});

//定义 vue2的this,当前组件
const $self = getCurrentInstance();

//定义 $attrs
const $attrs = useAttrs();



//定义data
const $data = reactive({"host":"/demo/login","returnUrl":"/demo/app3?"});


const $props = defineProps({

});





const list = ref();

//定义事件
const $emit = defineEmits(["update:modelValue","loaded"]);



const login_click = function() {
    top.location.href = $data.host + "?app-id=admin&return-url=" + encodeURIComponent($data.returnUrl);
};

onMounted( function() {
} )



</script>
